package com.cdream.basic.thread;

import cn.hutool.core.lang.Console;
import cn.hutool.log.Log;

/**
 * @author cdream
 * @date 2020/11/18
 */
public class LogHandler implements Thread.UncaughtExceptionHandler
{
    @Override
    public void uncaughtException(Thread t, Throwable e) {

        Log log = Log.get();
        log.info(t.getName(),e.getMessage());
        Console.log(e.getMessage());

    }
}
